<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<%@ taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
<%@ taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Search Schedules</title>
<style>
BODY {
	PADDING-RIGHT: 32px;
	MARGIN-TOP: 100px;
	PADDING-LEFT: 32px;
	FONT-SIZE: 20px;
	BACKGROUND: #eee;
	PADDING-BOTTOM: 32px;
	MARGIN-LEFT: auto;
	WIDTH: 270px;
	COLOR: #000;
	MARGIN-RIGHT: auto;
	PADDING-TOP: 32px;
	FONT-FAMILY: verdana, arial, sans-serif
}

#LoginBoard {
	BORDER-RIGHT: #bbb 1px solid;
	PADDING-RIGHT: 32px;
	BORDER-TOP: #bbb 1px solid;
	PADDING-LEFT: 32px;
	BACKGROUND: #fff;
	PADDING-BOTTOM: 32px;
	BORDER-LEFT: #bbb 1px solid;
	PADDING-TOP: 32px;
	BORDER-BOTTOM: #bbb 1px solid
}

#Heading {
	PADDING-RIGHT: 0px;
	PADDING-LEFT: 0px;
	FONT-WEIGHT: bold;
	FONT-SIZE: 150%;
	PADDING-BOTTOM: 18px;
	MARGIN: 0px;
	COLOR: #904;
	PADDING-TOP: 0px;
	FONT-FAMILY: "trebuchet ms", "" lucida grande "", verdana, arial,
		sans-serif
}

LABEL {
	DISPLAY: block;
	FONT-WEIGHT: bold;
	FONT-SIZE: 9px;
	MARGIN: 6px 0px 2px;
	TEXT-TRANSFORM: uppercase;
	COLOR: #999
}

.inputBox {
	PADDING-RIGHT: 2px;
	PADDING-LEFT: 2px;
	PADDING-BOTTOM: 2px;
	WIDTH: 400px;
	PADDING-TOP: 2px;
	FONT-FAMILY: verdana, arial, sans-serif
}

.button {
	margin-top: 8px;
}

table {
	margin-top: 30px;
	margin-left: auto;
	margin-right: auto;
	empty-cells: show;
	border-top-style: solid;
	border-bottom-style: solid;
	border-left-style: solid;
	border-right-style: solid;
	border-top-width: 2px;
	border-bottom-width: 2px;
	border-left-width: 2px;
	border-right-width: 2px;
	border-top-color: #b2d5d6;
	border-bottom-color: #b2d5d6;
	border-left-color: #b2d5d6;
	border-right-color: #b2d5d6;
	vertical-align: baseline;
	padding-bottom: 0px;
}

td {
	vertical-align: top;
	padding-bottom: 8px;
	font-size: small;
}

tr {
	background-color: #eff5fa;
	color: #4e6a71;
}

#head {
	height: 75pm;
	width: auto;
	padding: 0px;
	position: absolute;
	left: 0px;
	top: 0px;
}
.c1 {
	width: 100px;
	word-wrap: break-word;
	text-align: center;
}

.c2 {
	width: 100px;
	word-wrap: break-word;
	text-align: center;
}

.c3 {
	width: 100px;
	word-wrap: break-word;
	text-align: center;
}

.c4 {
	width: 100px;
	word-wrap: break-word;
	text-align: center;
}
</style>
</head>
<body>
<f:view>
	<h:form>
		<h:dataTable id="table" value="#{searchBackingBean.schedules}"
			var="item" border="0" cellpadding="4" columnClasses="c1,c2,c3,c4" rules="all"
			style="border:solid 1px">
			<h:column>
				<f:facet name="header">
					<h:outputText value="ID" />
				</f:facet>
				<h:outputText value="#{item.id}" />
			</h:column>
			<h:column>
				<f:facet name="header">
					<h:outputText value="Topic" />
				</f:facet>

				<h:commandLink value="#{item.topic}"
					action="#{searchBackingBean.viewSchedule}">
					<f:param value="#{item.id}" name="scheduleId" />
				</h:commandLink>
			</h:column>
			<h:column>
				<f:facet name="header">
					<h:outputText value="Owner" />
				</f:facet>
				<h:outputText value="#{item.host.nickName}" />
			</h:column>
			<h:column>
				<f:facet name="header">
					<h:outputText value="Tags" />
				</f:facet>
				<h:outputText value="#{item.tags}" />
			</h:column>
			<h:column>
			   <h:commandLink value="Subscribe" action="#{scheduleBackingBean.subscribeSchedule}">
			        <f:param value="#{item.id}" name="scheduleId"></f:param>
			   </h:commandLink>
			</h:column>
		</h:dataTable>
	</h:form>
</f:view>
</body>
</html>